let app = getApp();

const getUpdatePasswordUrl = require('../../config').getUpdatePasswordUrl
Page({
  data: {

  },
  formSubmit:function(e){
    console.log(e.detail.value);
    if (params.mobile == '' || params.password == '' || params.repassword == '') {
      wx.showModal({
        title: '警告',
        content: '输入框不能为空',
        success(res) {
          if (res.confirm) {
            return false
          } else if (res.cancel) {
            return false
          }
        }
      })
    }

  },
  modPassword: function (params){
    let that = thisl
    wx.request({
      url: getUpdatePasswordUrl,
      method:'POST',
      data: params,
      success:function(res){
        console.log(res)
      },
      fail: function (res) {
        wx.showModal({
          title: '错误',
          content: res.data.msg,
          success(res) {
            if (res.confirm) {
              console.log('用户点击确定')
            } else if (res.cancel) {
              console.log('用户点击取消')
            }
          }
        })
      }
    })
  }
})